package pico;

/**
 * 
 * @author Sander Meijer en Bart Wentink
 *
 */
public class PicoVariable {
	private String name;
	private String value;
	private String type;

	public PicoVariable(String name, String value, String type) {
		this.name = name;
		this.value = value;
		this.type = type;
	}

	public boolean isDeclared() {
		if (value.equals("")) {
			return false;
		}
		return true;
	}
	
	public void setValue(String value){
		this.value = value;
	}

	public String toString() {
		if (!isDeclared()) {
			return (type + " " + name + " = not declared");
		} else {
			return (type + " " + name + " = " + value);
		}
	}
}
